<?php
/**
 * GioCMS
 * 
 * LICENSE
 *
 * This source file is subject to the GNU GENERAL PUBLIC LICENSE Version 2 
 * that is bundled with this package in the file LICENSE.txt.
 * It is also available through the world-wide-web at this URL:
 * http://www.gnu.org/licenses/gpl-2.0.txt
 * If you did not receive a copy of the license and are unable to
 * obtain it through the world-wide-web, please send an email
 * to license@ninhgio.com so we can send you a copy immediately.
 * 
 * @copyright	Copyright (c) 2010-2011 GioCMS (http://cms.ninhgio.com)
 * @license		http://www.gnu.org/licenses/gpl-2.0.txt GNU GENERAL PUBLIC LICENSE Version 2
 * @author		NinhGio - ninhgio@gmail.com
 * @since		1.0
 */

class Modules_Upload_Widgets_Imagetoolbox_Widget extends Gio_Core_Widget
{
	public function showAction()
	{
		$json = new Services_JSON();
		$params = $this->_request->getParam('params');
		$params = (array)$json->decode($params);
		
		$this->view->uploadElementId = 'uploadFile_' . uniqid();
		$this->view->sessionId		  = Gio_Core_Session::getId();
		$this->view->editor 		  = 'ckeditor';
		$this->view->currModule       = Gio_Core_Controller::getIntance()->getModuleName();
	}
	
	public function configAction()
	{
		$request = $this->getRequest();
		
		$this->view->moduleName = Gio_Core_Widget::getIntance()->getModuleName();
		$this->view->widgetName = Gio_Core_Widget::getIntance()->getWidgetName();
		$this->view->widgetIndex = $request->getParam('widget_index');
	}
}
